/**
 * @description  手动入池审批
 * @author shenhong
 */
import React, { PropTypes, PureComponent, Fragment } from 'react';
import { connect } from 'dva';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import { Divider, Select, message, Row, Col, Table, Input } from 'antd';
import { TableC, SecondHeaderC } from '../../../comps';
@Form.create()
class ManualTable extends PureComponent {
  constructor(props) {
    super(props);
    this.state = {
      businessKey: '',
      type: '',
    };
  }

  componentDidMount() {}

  //渲染表格
  tableRender = () => {
    const { poolData } = this.props;

    const columns = poolData.columns;
    const dataSource = poolData.dataSource.inPoolWay == 'manual' ? poolData.dataSource.flowEditVo.item : poolData.dataSource.flowEditVo.itemAuto;

    return (
      <div style={{ marginTop: '10px' }}>
        <TableC columns={columns} dataSource={dataSource} hidePage={true} rowKey='id' />
      </div>
    );
  };

  render() {
    const { poolData } = this.props;
    const text = poolData.dataSource.inPoolWay == 'manual' ? '标的要素' : '条目要素';
    return (
      <div style={{ marginTop: '10px' }}>
        <div style={{ marginTop: '10px' }}>
          <SecondHeaderC title={`${text}`} />
        </div>
        {this.tableRender()}
      </div>
    );
  }
}
export default connect(({}) => ({}))(ManualTable);
